home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
COLOR2NU.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
1KB
|
43 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_Color2Num( cColor ) --> nColor
PARAMETERS:
cColor: a complete fore and back color setting attribute string
SHORT:
Convert a clipper color string to a Clipper internal color number.
DESCRIPTION:
_Color2Num() converts a color from Clipper's internal method of
representation to a literal color setting string, with foreground and
background, as well as high and blink characters.
It does NOT convert colors to the Clipper COLOR NUMBER (ie, n - 0, b -
1, etc). It is typically used to read a screen region with savescreen()
and determine the color of the screen at any given point.
NOTE:
See _ReColor() for an example of how this function is properly employed.
EXAMPLE:
t = savescreen(5,10,5,10)
t = substr(t,1,1)+chr(_Color2Num('w+/r'))
restscreen(5,10,5,10,t)
Result: Whatever is at screen position 5,10 is rewritten in "w+/r". This
is precisely what _Recolor() does.
******************************************************************************/